<html>
    <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1">
    <head>
        <title>山西地方电力 工程项目管理</title>        
        <link rel="shortcut icon" type="image/png" href="/public/images/favicon.png">  
	    <link href="/public/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
	    <script src="/public/javascripts/jquery/jquery-1.5.2.min.js" type="text/javascript"></script>    
	    <script src="/public/ligerUI/js/ligerui.min.js"  type="text/javascript"></script>	    
        <style type="text/css"> 
        body,html{height:100%;}
        body{ padding:0px; margin:0; overflow:hidden;}  
        .l-link{ display:block; height:26px; line-height:26px; padding-left:10px; text-decoration:underline; color:#333;}
        .l-link2{text-decoration:underline; color:white;}
        .l-layout-top{background: url('/public/ligerUI/images/banner.jpg') no-repeat;}
        .l-layout-bottom{ background:#E5EDEF; text-align:center;}
        #pageloading{position:absolute; left:0px; top:0px; background:white url('loading.gif') no-repeat center; width:100%; height:100%;z-index:99999;}
        .l-link{ display:block; line-height:22px; height:22px; padding-left:20px;border:1px solid white; margin:4px;}
        .l-link-over{ background:#FFEEAC; border:1px solid #DB9F00;}
        .l-winbar{ background:#2B5A76; height:30px; position:absolute; left:0px; bottom:0px; width:100%; z-index:99999;}

        /* 顶部 */ 
        .l-topmenu-welcome{ position:fixed; z-index:-1; height:50px; line-height:50px; right:50px; top:2px; }
        .l-topmenu-welcome span{ color: white;} 
        .l-topmenu-welcome a{ text-decoration:underline; color: white;} 

        </style>
        <script type="text/javascript">
            var tab = null;
            var accordion = null;
            var tree = null;
            $(function ()
            {   
                //布局
                $("#layout1").ligerLayout({ leftWidth: 140, height: '100%', onHeightChanged: f_heightChanged });
                var height = $(".l-layout-center").height();

                //Tab
                $("#framecenter").ligerTab({ height: height });

                //面板
                $("#accordion1").ligerAccordion({ height: height - 24, speed: null });
                $(".l-link").hover(function ()
                {
                    $(this).addClass("l-link-over");

                }, function ()
                {
                    $(this).removeClass("l-link-over");
                });

                //树
                $("#tree1").ligerTree({
                	url:"/symenu/showMenu",
                    checkbox: false,
                    slide: false,
                    nodeWidth: 120,
                    attribute: ['nodename', 'url'],
                    onSelect: function (node)
                    {
                        if (!node.data.url) return;
                        var tabid = $(node.target).attr("tabid");
                        if (!tabid)
                        {
                            tabid = new Date().getTime();
                            $(node.target).attr("tabid", tabid)
                        }

                        f_addTab(tabid, node.data.text, node.data.url);

                    }

                }); 
               
                tab = $("#framecenter").ligerGetTabManager();

                accordion = $("#accordion1").ligerGetAccordionManager();
                tree = $("#tree1").ligerGetTreeManager();
                

                $("#pageloading").hide();

            });
           
            function f_heightChanged(options)
            {
                if (tab)
                    tab.addHeight(options.diff);
                if (accordion && options.middleHeight - 24 > 0)
                    accordion.setHeight(options.middleHeight - 24);
            }

            function f_addTab(tabid,text, url)
            {   
                tab.addTabItem({ tabid : tabid,text: text, url: url });
            } 
           
     </script> 

	

</head>

<body style="padding:0px;">  
  <div id="pageloading"></div> 
  <div id="layout1" style="width:100%">
        <div id="layout-top" position="top" style="">  
            <div style="margin-top:0px; margin-left:0px;"  class=".l-title">                             
                <div class="l-topmenu-welcome">
                <span>欢迎您使用工程项目管理！【${connected.realName} 已登录】</span><span class="space">|</span>
                <a href="#" id="changePWA">修改密码</a> 
                <span class="space">|</span>
                <a href="@{Application.logout}" class="l-link2">退出</a>
                </div>
            </div>            
        </div>
        <div position="left"  title="功能菜单" id="accordion1" >
         	<div title="功能列表" class="l-scroll">
                 <ul id="tree1" style="margin-top:3px;">
            </div>
  	        <!-- <div title="工程管理" class="l-scroll">
	             <div style=" height:7px;"></div>
	             <a class="l-link rolea" href="javascript:f_addTab('1','工程填报','/projects')">
	             	工程填报</a>
	             <a class="l-link rolea" href="javascript:f_addTab('3','基建工程月报表','/constructP/index')">
	             	基建工程月报表</a>
	             <a class="l-link rolea" href="javascript:f_addTab('4','基建工程报表审核','/constructP/verify')">
	             	基建工程报表审核</a>
	        </div>
            <div title="系统设置">
                <div style=" height:7px;"></div>
                 <a class="l-link rolex" href="javascript:f_addTab('91','科室','/depts')">部门</a>                                               
                 <a class="l-link rolex" href="javascript:f_addTab('92','人员','/users')">人员</a> 
                 <a class="l-link rolex" href="javascript:f_addTab('93','工程类型','/projectType/index')">工程类型</a>
                 <a class="l-link rolex" href="javascript:f_addTab('94','菜单维护','/symenu/index')">菜单维护</a>
                 <a class="l-link rolex" href="javascript:f_addTab('95','角色维护','/role/index')">角色维护</a>
                 <a class="l-link rolex" href="javascript:f_addTab('96','角色菜单管理','/rolemenu/index')">角色菜单管理</a>
           </div> -->
           
        </div> 

        <div position="center" id="framecenter"> 
            <div tabid="home" title="我的主页" style="height:1000px" >
                <iframe frameborder="0" name="home" id="home" ></iframe>
            </div> 
        </div> 

    </div>
    <div style="display:none"></div>
    <div id="changePWDiv" style="display:none">
        <ul style="display: block; clear: both; width:250px; height: auto; font-size: 13px; margin-bottom: 15px;">
        <li style="display: inline; float: left; width: 200px; height: 25px; line-height: 25px;">
                注：密码长度6-16位</li>
        </ul>
        <ul style="display: block; clear: both; width:250px; height: auto; font-size: 13px; margin-bottom: 15px;">
            <li style="display: inline; float: left; width: 80px; height: 25px; line-height: 25px;">
                当前密码</li>
            <li style="display: inline; float: left; height: 25px; line-height: 25px;">
                <input id="curPassword" type="password" style="display: inline; float: left; height: 18px; line-height: 18px;">
            </li>
        </ul>        
        <ul style="display: block; clear: both; width:250px; height: auto; font-size: 13px; margin-bottom: 15px;">
            <li style="display: inline; float: left; width: 80px; height: 25px; line-height: 25px;">
                新密码</li>
            <li style="display: inline; float: left; height: 25px; line-height: 25px;">
                <input id="password" type="password" style="display: inline; float: left; height: 18px; line-height: 18px;"></li>            
        </ul>        
        <ul style="display: block; clear: both; width:250px; height: auto; font-size: 13px; margin-bottom: 15px;">
            <li style="display: inline; float: left; width: 80px; height: 25px; line-height: 25px;">确认密码</li>
            <li style="display: inline; float: left; height: 25px; line-height: 25px;">
                <input  id="password2" type="password" style="display: inline; float: left; height: 18px; line-height: 18px;"></li>
            <li style="display: inline; float: left; height: 25px; line-height: 25px; margin-left: 25px;"></li>
        </ul>        
    </div>
</body>
    <script type="text/javascript">

        $('#changePWA').bind('click', function() {
            $.ligerDialog.open({ target: $("#changePWDiv"), 
                buttons: [ 
                { text: '确定', id: "changePW", onclick: function (item, dialog) { changePassword(); } }, 
                { text: '关闭', onclick: function (item, dialog) { dialog.hide(); } } ] });   
        });
        
        //修改密码
        function changePassword() {
            var cp = $("#curPassword").val(); var p = $("#password").val(); var p2 = $("#password2").val();
            var action = "@{Application.changePassword}";
            $.get(action, {curPassword: cp, password: p, password2: p2},
                function(data){alert(data); $(":password").val(""); }
            );
        };
    </script>
</html>